home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000010_icon-group-sender _Thu Apr 30 08:10:10 1998.msg < prev    next >
Text File  |  2000-09-20  |  4KB  |  106 lines

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id IAA05988
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Thu, 30 Apr 1998 08:10:09 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA11144; Thu, 30 Apr 1998 08:10:06 -0700
  7. Message-Id: <3.0.5.32.19980430041203.007b14b0@doors>
  8. X-Sender: bgbauer#alpha.delta.edu@doors
  9. X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32)
  10. Date: Thu, 30 Apr 1998 04:12:03 -0700
  11. To: "Icon Group"<icon-group@optima.CS.Arizona.EDU>
  12. From: Scissors <jebediah@bigfoot.com>
  13. Mime-Version: 1.0
  14. Content-Type: text/plain; charset="us-ascii"
  15. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  16. Status: RO
  17. Content-Length: 3513
  18.  
  19.  
  20. Thanks for the responses.  I should get around to trying out just '\n'
  21. tonight.
  22. And see if that solves the problem.  
  23.  
  24. At 11:10 PM 4/29/98 -0500, you wrote:
  25. >Hi,
  26. >
  27. >I am not sure quite what is happening with your EOL terminations.  Wi's
  28. >linebreak=CRLF feature is not supposed to turn itself off accidentally and
  29. >at random.
  30.  
  31. After I opened up the files and got to looking at it I noticed it isnt random.
  32. All of the files I've edited using WI appear to have the same 'musical note'
  33. ending for lines.  So the files are appearing fine, until I open, and then
  34. save them in notepad, which loses all of the EOL marks.
  35.  
  36. Im using WI, and the Win32 version of Icon on win 95. (But only working so
  37. far with DOS Console programming.  (Ive only been using WI so far because I
  38. like having a project file, so I can switch back and forth.  I cant figure
  39. out how to compile with it yet, so I do this on the command line.)
  40.  
  41.   Wi could be writing out the files in a way that notepad doesn't
  42. >like, and it shouldn't be that hard to identify the problem if that's the
  43. >case.  I'll try to reproduce your bug, and get back to you.
  44.  
  45. It may just be a win 95 problem, as you mentioned NT uses differnt EOL's.
  46.  
  47. >Regarding your list of lines, there is no easy way in Icon to insert an
  48. >element into the middle of the list, but it is easy to grow the list by
  49. >calling put(L, "a new element") and thenyou can slide the elements down
  50. >a notch as you suggested.
  51. >
  52. >>  is "\r\l" the incorrect line termination sequence?  I tried "\r\n" and it
  53. >>  does the same.  What is the correct EOL for dos/win?
  54. >
  55. >Under DOS Icon, you just use "\n" as your newline character and the "\n" is
  56. >converted to "\r\n".
  57.  
  58. Will this work with Win 95 version of Icon?  Im assuming so...
  59.  
  60. > Windows NT uses the UNIX convention that \n is an EOL
  61. >so again the \r is generally not needed.  Win32 applications like Windows
  62. Icon
  63. >are native on NT, but legacy programs like notepad may still require \r\n.
  64.  
  65. >To write old DOS-style lines you might say \r\n.  Note that write() appends
  66. >its own \n, so to write hello in a DOS file you would say write("hello\r").
  67. >There is no \l character in Icon as far as I know.
  68. >
  69. >I'm happy to help work through the newline problems you are experiencing.
  70. >First thing will be for me to try going back and forth between notepad
  71. >and wi.
  72.  
  73. I tinkered with it a bit today, and I got it so that I Can insert the line
  74. correctly.  It appears as two lines now.  I believe I switched the EOL's I
  75. was trying to use, to "\l".  (Which I got from the help file as below under
  76. Escape sequences).
  77.  
  78. \f     formfeed         \\     backslash 
  79. \l     linefeed (newline)     \ddd     octal code 
  80. \n     newline (linefeed)     \xdd     hexadecimal code 
  81. \r     carriage return         \^c     control code 
  82.  
  83. But now when I attempt to tab(match()) the 'most recently' inserted line I
  84. get no match.  Apparantly it is being interpreted in my Read() as being
  85. part of the previous line still.  This only affects the last line I
  86. inserted this way, because after I read() the file in again, and write() it
  87. out, it corrects the problem, due to write() adding the correct EOL's.  
  88.  
  89. Hopefully using "\n" will fix this for me : )!
  90.  
  91. I looked through WI's code, but all I saw for an EOL Seq. assignment was it
  92. being set to CRLF, which I couldnt determine where it knew what the value
  93. of CRLF was.  If you do find some way to overcome this, please let me know
  94. so I Cant edit it into WI.  Until then I will remember not to save in
  95. notepad! Youch!  
  96.  
  97. Thanks to all!
  98.  
  99. >
  100. >Clint Jeffery, jeffery@cs.utsa.edu
  101. >
  102. >
  103. >
  104. >
  105.  
  106.